IntroductionThis guide will explain all the ins and outs of the CFG file setup and configuration.
OverviewCfg files are an important part to the dts pipeline, as they allow you to directly control what's going into the dts and what's being left out. If you're making simple shapes like crates, barrels, trees, etc, then you can get away without knowing about cfg files. The exporter will be able to handle those shapes without be told how to operate. The usefulness of cfg files is made apparent once you start getting into things with animation and characters. The standard cfg looks like this: AlwaysExport: eye cam mount0 //mount1 //jetnozzle0 NeverExport: Bip01 Bip01 L Finger* Bip01 R Finger* Dummy* Bip01 L Toe* Bip01 R Toe* start01 mountpoint DELETE* //Ski0 //Ski1 Light0 Light1 //Mount1 //Mount2 +Error::AllowEmptySubtrees +Error::AllowCrossedDetails +Error::AllowUnusedMeshes -Error::AllowOldSequences -Error::RequireViconNode -Param::CollapseTransforms //=Params::T2AutoDetail -1 You can comment out lines of the .CFG by using "//". In this example, I am culling out nodes that are not animated in the DSQ files, and are not necessary for the shape to function. The more nodes that you can cull out, the smaller and more efficient the shape will be. Allow me to break down for you how this works. You have two main headings; AlwaysExport and NeverExport. Under these headings you have everything in your scene listed. The heading names whould make their purpose rather obvious. under AlwaysExport, you have things that you want included in the DTS. Under NeverExport, you have things that you want omitted. You can also achieve the same results in the DTS shape file by exporting it with 'collapse transforms' option disabled. This is not considered to be a good practice, as you should be using the .CFG files to control your node structure, but it works as it ensures that ALL the nodes in the shape are included in the DTS file. Now that you have a .CFG file, and it is set up properly with all the relevant nodes on the list, and all extraneous shapes and nodes (Lights, reference shapes, etc...) culled out by putting them on the 'Never Export" list, you are ready for exporting the finished model. Export it as above. For some additional light reading until the information has been moved over, use Additional DTS Exporter Features Reference
SetupOnly one CFG file is allowed per directory and it should be placed in the same directory as your source file (.max). If you are working with multiple models or instances of a unique model, you will need to create a new directory with a CFG file (typically copied over with small tweaks). If you are using 3DS Max but you are not using a .max file you may have to save as a .max and open it up again in order for the CFG file to work.
Setup Notes for Windows Maya UsersIf you are trying to export from windows and the .cfg file doesn't seem to be working, it may be due to Maya looking for Unix-based line feeds instead of Windows-based carraige returns. To confirm this problem, export, then open the dump.dmp file in a text editor and look at the first few lines. First you should see a line that starts with "Begin reading config file..." followed by the path to the file. If this is there, then it isn't a problem with Maya not finding the file. The next few lines should read similar to this: Always export node: "Eye" Always export node: "Mass" Always export node: "Mount0" Always export node: "Mount10" Always export node: "Cam" To determine if you have the above problem, look very carefully at each item that is between quotes. There should be nothing between the last letter of the node you are trying to export and the closing quote. If there is that "square" character that denotes an unknown character before the closing quote, then this is your problem. (I can't demonstrate it here, but it's the one you get when doing something like opening a japanese web page without the language installed.) Likewise, if you see the name of the node, and the closing quote is on the next line, like this: Always export node: "Eye " Always export node: "Mass " Always export node: "Cam" then, once again, it is a Unix line feed problem. (Note: if you saved your .cfg with a carraige return after the last entry, then the last quote will also be on the next line and none of the nodes will export. If you did not put a carraige return after the last entry, then the last node in the list will export properly while the proceeding ones will not.) Here's one way to fix it: 1- Download and install Ultra Edit or similar programming-oriented text editor. (The full name is UltraEdit 32. Just do a web search. It's free for 30 days and something you should have if you have no other dedicated script editor.) 2- Open up your .cfg file, then do a "save as". 3- Enter the name of the file as usual if necessary. (Make sure the extension in the name says ".cfg") 4- In the "Save as type:" field, make sure it's saved as a text file, as normal. 5- In the "Line Terminator:" field, change this to "Unix Terminators - LF". 6- In the "Format:" field, leave as "default". 7- Save. 8- Export again. 9- Open up the dump.dmp file to confirm that it is working correctly now. The "Line Terminator:" field is the important one. Any text editor that allows you to change this option to Unix line feeds will work. Ultra Edit is just the one I use. Happy Exporting, -Captain Guy Smiley
The Dump FileYou will be able to check if the cfg file has been loaded and works correctly through the dump file.
|